package Res;
import com.badlogic.gdx.math.Vector2;

import Clock.Clock;
import Clock.IUpdate;
import Component.GameComponent;
import Component.GraphComponent;
import GameObj.GameObject;
import Scene.Renderable;
import org.json.JSONObject;
public abstract class Resource implements Renderable, IUpdate
{
	final public static int E_TILERES = 1;
	final public static int E_STATICRES = 2;
	
	abstract public void LoadRes(String fileName);
	abstract public void LoadRes(JSONObject json);
	abstract public void Update(Clock clock);
	public int nWidth;
	public int nHeight;
	final public static Resource createResourceByType(int nType)
	{
		switch(nType)
		{
		case E_TILERES:
			return new TileResource();
			
		case E_STATICRES:
			return new StaticImgResource();
		default:
			break;
		}
		return null;
		
	}
	

	Vector2 vPos; 

	
	public void SetPos(Vector2 v)
	{
		vPos = v;		
	}
}
